#ifndef __SENSOR_TF_LUNA_REG_H__
#define __SENSOR_TF_LUNA_REG_H__

#define TF_LUNA_SENSOR_ADDR                         0x10        /*!< Slave address of the TF_LUNA sensor */
#define TF_LUNA_I2C_MAX_FREQ                        400000      /*!< unit: bps */

#define TF_LUNA_DIST_REG_ADDR                       0x00
#define TF_LUNA_DIST_REG_LEN                        2
#define TF_LUNA_AMP_REG_ADDR                        0x02
#define TF_LUNA_AMP_REG_LEN                         2
#define TF_LUNA_TEMP_REG_ADDR                       0x04
#define TF_LUNA_TEMP_REG_LEN                        2
#define TF_LUNA_TICK_REG_ADDR                       0x06
#define TF_LUNA_TICK_REG_LEN                        2
#define TF_LUNA_ERROR_REG_ADDR                      0x08
#define TF_LUNA_ERROR_REG_LEN                       2

#define TF_LUNA_VERSION_REVISION_REG_ADDR           0x0A
#define TF_LUNA_VERSION_MINOR_REG_ADDR              0x0B
#define TF_LUNA_VERSION_MAJOR_REG_ADDR              0x0C

#define TF_LUNA_MODULE_SN_REG_ADDR                  0x10
#define TF_LUNA_MODULE_SN_REG_LEN                   14

#define TF_LUNA_ULTRA_LOW_POWER_REG_ADDR            0x1F
#define TF_LUNA_ULTRA_LOW_POWER_NORMAL              0x00
#define TF_LUNA_ULTRA_LOW_POWER_EN                  0x01

#define TF_LUNA_SAVE_CUR_SETTING_REG_ADDR           0x20
#define TF_LUNA_SAVE_CUR_SETTING                    0x01

#define TF_LUNA_REBOOT_REG_ADDR                     0x21
#define TF_LUNA_REBOOT                              0x02

#define TF_LUNA_SLAVE_ADDR_REG_ADDR                 0x22

#define TF_LUNA_WORK_MODE_REG_ADDR                  0x23
#define TF_LUNA_WORK_MODE_CONTI_RANGING             0x00
#define TF_LUNA_WORK_MODE_TRIGGER                   0x01

#define TF_LUNA_TRIG_ON_SHOT_REG_ADDR               0x24
#define TF_LUNA_TRIGGER_ONCE                        0x01

#define TF_LUNA_LIDAR_ENABLE_REG_ADDR               0x25
#define TF_LUNA_LIDAR_TURN_OFF                      0x00
#define TF_LUNA_LIDAR_TRUN_ON                       0x01

#define TF_LUNA_FPS_REG_ADDR                        0x26
#define TF_LUNA_FPS_REG_LEN                         2

#define TF_LUNA_LOW_POWER_REG_ADDR                  0x28
#define TF_LUNA_LOW_POWER_NORMAL                    0x00
#define TF_LUNA_LOW_POWER_POWER_SAVING              0x01

#define TF_LUNA_RESTORE_FACTORY_DEFAULTS_REG_ADDR   0x29
#define TF_LUNA_RESTORE_FACTORY_DEFAULT_SETTINGS    0x01

#define TF_LUNA_AMP_THRSHOLD_REG_ADDR               0x2A
#define TF_LUNA_AMP_THRSHOLD_REG_LEN                2
#define TF_LUNA_DUMMY_DIST_REG_ADDR                 0x2C
#define TF_LUNA_DUMMY_DIST_REG_LEN                  2
#define TF_LUNA_MIN_DIST_REG_ADDR                   0x2E
#define TF_LUNA_MIN_DIST_REG_LEN                    2
#define TF_LUNA_MAX_DIST_REG_ADDR                   0x30
#define TF_LUNA_MAX_DIST_REG_LEN                    2
#define TF_LUNA_SIGNATURE_REG_ADDR                  0x3C
#define TF_LUNA_SIGNATURE_REG_LEN                   4

#endif /* __SENSOR_TF_LUNA_REG_H__ */
